home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
asm
/
games
/
scanconfig
/
getcpu_str.s
< prev
Wrap
Text File
|
1980-01-03
|
866b
|
27 lines
*******************************************************************************
* _LVOGetCPU
* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
* $Inputs: None.
* $Outputs: a0.l = Ptr to CPU Type string
*
* $Requirements: The Execbase *MUST* be intact for this code to work,
* in particular the cpu attention flags!
******************************************************************************
AttnFlags = $128
_LVOGetCPU: move.l 4.w,a6
move.b AttnFlags+1(a6),d0 ;get CPU/MMU/CP Types from OS
andi.b #%00001111,d0 ;we only want CPU types..
moveq #"0",d1
findcpu: tst.b d0 ;got cpu type yet?
beq.s showcpu
lsr.b #1,d0 ;check for next type...
addq.b #1,d1 ;increase cpu type by 1
bra.s findcpu
showcpu: lea CPUType(pc),a0
move.b d1,5(a0)
rts
CPUType: dc.b 'MC680x0',0 ;'x' inserted with 0,1,2,3 or 4
even